package com.wonders.frame.chron.model.bo;
// default package

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

import com.wonders.frame.core.model.IDefaultModel;

/**
 * AfChCatalog entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "AF_CH_CATALOG")
public class Catalog implements IDefaultModel {

	// Fields

	private Integer id;
	private String name;
	private String property;
	private String type;
	private Integer removed;
	private String code;
	private String parentCode;
	private String resourceType;

	
	// Constructors

	/** default constructor */
	public Catalog() {
		this.removed = 0;
	}

	public Catalog(String name, String code, String property) {
		super();
		this.name = name;
		this.property = property;
		this.code = code;
	}

	/** full constructor */
	public Catalog(String name, String property, String type,
			Integer removed) {
		this.name = name;
		this.property = property;
		this.type = type;
		this.removed = removed;
	}

	public Catalog(String name, String property, String type, Integer removed,
			String code, String resourceType,String parentCode) {
		super();
		this.name = name;
		this.property = property;
		this.type = type;
		this.removed = removed;
		this.code = code;
		this.parentCode = parentCode;
		this.resourceType = resourceType;
	}

	// Property accessors
	@Id
	@GeneratedValue(strategy = GenerationType.SEQUENCE,generator ="Generator")   
	@SequenceGenerator(name = "Generator", sequenceName  = "seq_af_ch_catalog",allocationSize=1)
	@Column(name = "ID", unique = true, nullable = false)
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@Column(name = "NAME", length = 50)
	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Column(name = "PROPERTY", length = 10)
	public String getProperty() {
		return this.property;
	}

	public void setProperty(String property) {
		this.property = property;
	}

	@Column(name = "TYPE", length = 10)
	public String getType() {
		return this.type;
	}

	public void setType(String type) {
		this.type = type;
	}

	@Column(name = "REMOVED", precision = 22, scale = 0)
	public Integer getRemoved() {
		return this.removed;
	}

	@Column(name = "PARENT_CODE", length = 10)
	public String getParentCode() {
		return parentCode;
	}

	public void setParentCode(String parentCode) {
		this.parentCode = parentCode;
	}

	public void setRemoved(Integer removed) {
		this.removed = removed;
	}

	@Column(name = "CODE", length = 2)
	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	@Column(name = "RESOURCE_TYPE", length = 10)
	public String getResourceType() {
		return resourceType;
	}

	public void setResourceType(String resourceType) {
		this.resourceType = resourceType;
	}

	@Override
	public String toString() {
		return "Catalog [id=" + id + ", name=" + name + ", property="
				+ property + ", type=" + type + ", removed=" + removed
				+ ", code=" + code + ", parentCode=" + parentCode
				+ ", resourceType=" + resourceType + "]";
	}



}